﻿IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('Site') AND [name]='SiteDir')
BEGIN
	ALTER TABLE Site ADD SiteDir nvarchar(200)
END
GO

IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('Site') AND [name]='Status')
BEGIN
	ALTER TABLE Site ADD Status INT 
END
GO



IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('SysLog') AND [name]='Status')
BEGIN
	ALTER TABLE SysLog ADD Status INT 
END
GO
IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('SysLog') AND [name]='OrderBy')
BEGIN
	ALTER TABLE SysLog ADD OrderBy INT 
END
GO
IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('SysLog') AND [name]='AddTime')
BEGIN
	ALTER TABLE SysLog ADD AddTime datetime default(GETDATE())
END
GO

IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('News') AND [name]='Status')
BEGIN
	ALTER TABLE News ADD Status INT 
END
GO

IF NOT EXISTS(SELECT * FROM syscolumns WHERE id = OBJECT_ID('NewsData') AND [name]='Status')
BEGIN
	ALTER TABLE NewsData ADD Status INT 
END
GO